﻿using System;
using System.Globalization;
using System.Windows;
using System.Windows.Data;

namespace MathematicallySafe.HeadCounter.Converters
{
    [ValueConversion(typeof (bool), typeof (Visibility))]
    public class BoolToVisibility : IValueConverter
    {
        public Visibility False { get; set; }
        public Visibility True { get; set; }

        #region IValueConverter Members

        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            return ((bool) value) ? True : False;
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            return null;
        }

        #endregion
    }
}